/*
package com.salt.client.filter;

import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import com.netflix.zuul.exception.ZuulException;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

*/
/**
 * @Description
 * @Author salt
 * @Date 2021/9/26
 * @Version 1.0.1
 *//*

@Component
public class WebSocketFilter extends ZuulFilter {

    @Override
    public String filterType() {
        return "pre";
    }

    @Override
    public int filterOrder() {
        return 0;
    }

    @Override
    public boolean shouldFilter() {
        return true;
    }

    @Override
    public Object run() throws ZuulException {
        RequestContext ctx = RequestContext.getCurrentContext();
        HttpServletRequest request = ctx.getRequest();
        String upgrade = request.getHeader("Upgrade");
        if (null == upgrade) {
            upgrade = request.getHeader("upgrade");
        }
        if (null != upgrade && "websocket".equalsIgnoreCase(upgrade)) {
            ctx.addZuulRequestHeader("connection", "Upgrade");
        }
        return null;
    }
}
*/
